package com.example.demo.Mappers;

import com.example.demo.beans.OrderBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by Administrator on 2018-06-02.
 * 自动挂号
 */
@Mapper
public interface ZdghMapper {
    @Select("select OrderDate,TypeID,TypeName,DeptID,DoctID,RankName,RegID,AppFee,RegFee,TreatFee,OtherFee,TimeRegion,Specialty,IsAvailable,RegWay,IsPay,PatientID,CardNo,yyghid,ghxh from AutoOrderList where IsPay='1'AND ghxh='' and OrderDate>=(select CONVERT(varchar(10),GETDATE(),120)+' 00:00:00.000') and OrderDate<=(select CONVERT(varchar(10),GETDATE(),120)+' 00:30:00.000')")
    List<OrderBean> getAutoBean();
@Update("Update AutoOrderList set ghxh=#{ghxh} where yyghid=#{yyghid} and ghxh='' and PatientID=#{PatientID}")
    void UpdateAutoOder(@Param("ghxh")String ghxh,@Param("yyghid")String yyghid,@Param("PatientID")String PatientID);
}
